package com.newtouch.bxzs.business.whiteList.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.newtouch.bxzs.business.whiteList.model.WhiteListBO;
import com.newtouch.bxzs.business.whiteList.model.WhiteListVO;
import com.newtouch.bxzs.common.base.model.WhiteList;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.data.domain.Page;

import java.util.List;

/**
 * 白名单
 *
 * <p>
 * <b>History:</b>
 * <table border="1">
 * <tr>
 * <th>Date</th>
 * <th>Operator</th>
 * <th>Memo</th>
 * </tr>
 * <tr>
 * <td>2021年8月18日</td>
 * <td>Amour</td>
 * <td>Create</td>
 * </tr>
 * </table>
 *
 * @author Amour
 *
 * @version 1.0.0
 * @since 1.0.0
 */
@Mapper
public interface WhiteListMapper extends BaseMapper<WhiteList> {
    /**
     * 获取白名单列表
     *
     * @param
     * @param
     * @param
     * @return 白名单列表
     */
    IPage<WhiteListBO> getWhiteList(WhiteListVO whiteListVO);


    List<WhiteListBO> getWhiteList1();
    /**
     * 新增/修改
     */
    boolean modifyWhiteList(WhiteList whiteList);
    /**
     * 逻辑删除
     */
    @Update("update ASSISTANT_WHITELIST set IS_DELETE = #{delState} where WHITE_LIST_ID = #{whiteListId}")
    int updateDelState(@Param("whiteListId") String whiteListId, @Param("delState") Boolean delState);
}
